// pages/msgPage/msgPage.js
var app=getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
msg:[]
  },
  onLoad: function (options) {
    this.load_data()
  },
  load_data(){
    let that=this
    wx.cloud.callFunction({
      name:"getUserInfo",
      data:{
        openid:app.globalData.openid
      },
      success(res){
         console.log(res)
         console.log(res.result.data[0]['myMessage'])
         that.setData({
           msg:res.result.data[0]['myMessage']
         })
      },
      fail(res){
       console.log("数据拉取失败",res)
      }
    })
  },
  toDetail(e){
    let _id=e.currentTarget.dataset.uid;
    wx.navigateTo({
      url:'../detail/detail?_id=' + _id
    })
  }



})